<?php
class USStates extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Organizations the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
	
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'us_states';
	}
	
	//returns resultset of all states
	public function getAllStates() {
		$sql = "SELECT abbreviation_name FROM ".$this->tableName()." ORDER BY abbreviation_name";
		$states = $this->findAllBySql($sql);
		
		return $states;
	}
}
?>